<%@ page language="java" import="java.util.*,com.maizhi.service.impl.UserServiceImpl" pageEncoding="utf-8"%>
<%
	UserServiceImpl us = new UserServiceImpl();
	us.loginFlag(request,response);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <jsp:include page="/liger/liger.jsp"></jsp:include>
    
     <script type="text/javascript">
            var tab = null;
            var accordion = null;
            var tree = null;
            $(function ()
            {

                //布局
                $("#layout1").ligerLayout({ leftWidth: 150, height: '100%',heightDiff:0,space:2, onHeightChanged: f_heightChanged });

                var height = $(".l-layout-center").height();

                //Tab
                $("#framecenter").ligerTab({ height: height });

                //面板
                $("#accordion1").ligerAccordion({ height: height - 24, speed: null });

                $(".l-link").hover(function ()
                {
                    $(this).addClass("l-link-over");
                }, function ()
                {
                    $(this).removeClass("l-link-over");
                });
                //树
                $("#tree1").ligerTree({
                    data : indexdata,
                    checkbox: false,
                    slide: false,
                    nodeWidth: 120,
                    attribute: ['nodename', 'url'],
                    onSelect: function (node)
                    {
                        if (!node.data.url) return;
                        var tabid = $(node.target).attr("tabid");
                        if (!tabid)
                        {
                            tabid = new Date().getTime();
                            $(node.target).attr("tabid", tabid)
                        } 
                        f_addTab(tabid, node.data.text, node.data.url);
                    }
                });
                
                var link = "<%=request.getContextPath()%>/resourcesController.do?ligerTree";
                $("#menuTree").ligerTree({
                    url:link,
                    checkbox: false,
                    slide: false,
                    nodeWidth: 120,
                    attribute: ['nodename', 'url'],
                    onSelect: function (node)
                    {
                        if (!node.data.url) return;
                        var tabid = $(node.target).attr("tabid");
                        if (!tabid)
                        {
                            tabid = new Date().getTime();
                            $(node.target).attr("tabid", tabid)
                        } 
                        f_addTab(tabid, node.data.text, node.data.url);
                    }
                });

                tab = $("#framecenter").ligerGetTabManager();
                accordion = $("#accordion1").ligerGetAccordionManager();
                tree = $("#tree1").ligerGetTreeManager();
     
                $("#pageloading").hide();


			
            });
            
            
            function f_heightChanged(options)
            {
                if (tab)
                    tab.addHeight(options.diff);
                if (accordion && options.middleHeight - 24 > 0)
                    accordion.setHeight(options.middleHeight - 24);
            }
            
            
            function f_addTab(tabid,text, url)
            { 
                tab.addTabItem({ tabid : tabid,text: text, url: url });
            } 
            
     </script> 
     
	 <style type="text/css"> 
	    body,html{height:100%;}
	    body{ padding:0px; margin:0;   overflow:hidden;}  
	    .l-link{ display:block; height:26px; line-height:26px; padding-left:10px; text-decoration:underline; color:#333;}
	    .l-link2{text-decoration:underline; color:white; margin-left:2px;margin-right:2px;}
	    .l-layout-top{background:#102A49; color:White;}
	    .l-layout-bottom{ background:#E5EDEF; text-align:center;}
	    #pageloading{position:absolute; left:0px; top:0px; background:white url('/liger/loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
	    .l-link{ display:block; line-height:22px; height:22px; padding-left:16px;border:1px solid white; margin:4px;}
	    .l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;} 
	    .l-winbar{ background:#2B5A76; height:30px; position:absolute; left:0px; bottom:0px; width:100%; z-index:99999;}
	    .space{ color:#E7E7E7;}
	    /* 顶部 */ 
	    .l-topmenu{ margin:0; padding:0; height:31px; line-height:31px; background:url('/liger/lib/images/top.jpg') repeat-x bottom;  position:relative; border-top:1px solid #1D438B;  }
	    .l-topmenu-logo{ color:#E7E7E7; padding-left:35px; line-height:26px;background:url('/liger/lib/images/topicon.gif') no-repeat 10px 5px;}
	    .l-topmenu-welcome{  position:absolute; height:24px; line-height:24px;  right:30px; top:2px;color:#070A0C;}
	    .l-topmenu-welcome a{ color:#E7E7E7; text-decoration:underline} 
	 </style>
 
 
  </head>
  
<body style="padding:0px;background:#EAEEF5;">  
<div id="pageloading"></div>  
<!-- 
<div id="topmenu" class="l-topmenu">
    <div class="l-topmenu-logo">jQuery ligerUI Demos导航主页</div>
    <div class="l-topmenu-welcome">
        <a href="index.aspx" class="l-link2">服务器版本</a>
        <span class="space">|</span>
        <a href="https://me.alipay.com/daomi" class="l-link2" target="_blank">捐赠</a> 
        <span class="space">|</span>
         <a href="http://bbs.ligerui.com" class="l-link2" target="_blank">论坛</a>
    </div> 
</div>
 -->
 
 <div style="height:30px;line-height:30px;margin-left:20px;">
		 <font color=red>${loginUser.name}</font>  你好!  <a href="loginController.do?loginOut">退出</a>
 </div>
  <div id="layout1" style="width:99.9%;height:100%; margin:0 auto; margin-top:1px; ">

        <div position="left"  title="主要菜单" id="accordion1"> 
        			 
        			<div title="工作流系统" class="l-scroll">
        				 <div>&nbsp
        				 	<a  href="javascript:menuReload();"> 刷新 </a>&nbsp;
        				 	<a  href="javascript:menuExpend();"> 展开 </a>&nbsp
        				 	<a  href="javascript:menuUexpend();"> 收缩 </a>
        				 </div>
                         <ul id="menuTree" style="margin-top:3px;">
                    </div>
                    
                    <script type="text/javascript">
                    	
                    	var manager;
                    	
                    	function menuReload(){
                    		manager = $("#menuTree").ligerGetTreeManager();
                    		manager.clear();
                    		var link = "<%=request.getContextPath()%>/resourcesController.do?ligerTree";
			                $("#menuTree").ligerTree({
			                    url:link,
			                    checkbox: false,
			                    slide: false,
			                    nodeWidth: 120,
			                    attribute: ['nodename', 'url'],
			                    onSelect: function (node)
			                    {
			                        if (!node.data.url) return;
			                        var tabid = $(node.target).attr("tabid");
			                        if (!tabid)
			                        {
			                            tabid = new Date().getTime();
			                            $(node.target).attr("tabid", tabid)
			                        } 
			                        f_addTab(tabid, node.data.text, node.data.url);
			                    }
			                });
                    	}
                    	
                    	function menuExpend(){
                    		manager = $("#menuTree").ligerGetTreeManager();
                    		manager.expandAll();
                    	}
                    	
                    	function menuUexpend(){
                    		manager = $("#menuTree").ligerGetTreeManager();
                    		manager.collapseAll();
                    	}
                    </script>
                    
                    
        			<div title="系统菜单">
                    <div style=" height:7px;"></div>
                    	  <a class="l-link" href="javascript:f_addTab('deptManger','组织管理','deptController.do?dept')" >组织管理 </a>
                          <a class="l-link" href="javascript:f_addTab('userManger','用户管理','userController.do?user')" >用户管理</a> 
                          <a class="l-link" href="javascript:f_addTab('menuManger','菜单管理','linkController.do?menuManger')" >菜单管理</a>
                          <a class="l-link" href="javascript:f_addTab('menuList','菜单管理','menuController.do?menuList')" >菜单列表</a>
                          <a class="l-link" href="javascript:f_addTab('resourceManger','资源管理','resourcesController.do?resource')" >资源管理</a>
                          <a class="l-link" href="javascript:f_addTab('roleManger','角色管理','roleController.do?role')" >角色管理</a> 
                    </div>
                    
                    
                     <div title="功能列表" class="l-scroll">
                         <ul id="tree1" style="margin-top:3px;">
                    </div>
                    
                    <div title="应用场景">
                    <div style=" height:7px;"></div>
                         <a class="l-link" href="javascript:f_addTab('listpage','列表页面','demos/case/listpage.htm')">列表页面</a> 
                         <a class="l-link" href="demos/dialog/win7.htm" target="_blank">模拟Window桌面</a> 
                    </div>    
                    
                     <div title="实验室">
                    <div style=" height:7px;"></div>
                          <a class="l-link" href="lab/generate/index.htm" target="_blank">表格表单设计器</a> 
                          <a class="l-link" href="lab/formdesign/index.htm" target="_blank">可视化表单设计</a> 
                    </div>
                     
        </div>
        
        <div position="center" id="framecenter" style="border:0px;"> 
            <div tabid="home" title="系统主页" style="height:300px;border:0px;">
                <iframe frameborder="0" name="home" id="home" src="error/404.jsp"></iframe>
            </div> 
        </div> 
        
    </div>
    <!-- 
    <div  style="height:32px; line-height:32px; text-align:center;">
            Copyright © 2011-2013 www.ligerui.com
    </div>
    <div style="display:none"></div>
     -->
    
</body>
</html>
